package interface_test.youyong;

public class Test {

    public static void main(String[] args) {
        //接口不能实例化对象，需要向上转型
       Run run=new Dog();
       Run run1=new Rabbit();
       Fly fly=new Duck();
       Swim swim=new Duck();
       run.run();
       run1.run();
       fly.fly();
       swim.swim();
    }
}
